<template>
	<div class="add_goods">
		<fAddGoods v-if="admin_id == 3"></fAddGoods>
		<addGoods v-if="admin_type == 1 || is_subsidiary_corporation" ></addGoods>
		<bAddGoods v-if="admin_type == 2"></bAddGoods>

<!-- 		<el-dialog title="提示" :visible.sync="centerDialogVisible" center :modal-append-to-body="false" width="680px">
			<p style="text-align: center;font-size: 20px;margin-bottom: 20px;">请到家具大师商户版小程序或者APP添加商品(请用微信扫码)</p>
			<img style="display: block; margin: 0 auto;" src="../../assets/image/shanghuban.jpg" alt="">
			<span slot="footer" class="dialog-footer">
				<el-button @click="centerDialogVisible = false">取 消</el-button>
				<el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
			</span>
		</el-dialog> -->
	</div>
</template>

<script>
import fAddGoods from './components/add_goods/f_add_goods';
import bAddGoods from './components/add_goods/b_add_goods';
import addGoods from './components/add_goods/add_goods';
import sonMixin from '@/utils/sonMixin';
export default {
	name: 'add_goods',
	mixins:[sonMixin],
	components: {
		fAddGoods,
		bAddGoods,
		addGoods
	},
	data() {
		return {
			centerDialogVisible: false,
			key: localStorage.getItem('token'),
			admin_type: localStorage.getItem('admin_type'),
			admin_id: localStorage.getItem('admin_id') // admin_id 理员 1是总号，2是商家，3是厂家，4财务，5招商，6产品，7仓管 8收费厂家 9.外部招商员
		};
	},
	methods: {
		init() {
			// if (this.admin_id == 2) {
			// 	this.centerDialogVisible = true
			// 	this.$message({
			// 		message: '请到家具大师商户版小程序或者APP添加商品',
			// 		type: 'warning'
			// 	});
			// }
		}
	},
	created() {
		this.init();
	}
};
</script>

<style>
.add_goods {
	width: 100%;
	height: 100%;
}
.add-goods-iframe {
	width: 100%;
	height: 100%;
	background-color: #fff;
}
</style>
